home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / difutl27.zip / difutl27 / configure < prev    next >
Text File  |  1994-10-01  |  58KB  |  2,150 lines

  1. #!/bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 1.120 
  5. # Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
  6. #
  7. # This configure script is free software; you can redistribute it and/or
  8. # modify it under the terms of the GNU General Public License as published
  9. # by the Free Software Foundation; either version 2, or (at your option)
  10. # any later version.
  11. #
  12. # This script is distributed in the hope that it will be useful, but
  13. # WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
  15. # Public License for more details.
  16. #
  17. # You should have received a copy of the GNU General Public License
  18. # along with this script; if not, write to the Free Software
  19. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. #
  21. # The redistribution and modification terms for this script do not affect
  22. # the terms for software that it configures.
  23.  
  24. ac_help=
  25.  
  26. # Omit some internal or obsolete options to make the list less imposing.
  27. ac_usage="Usage: configure [options] [host]
  28. Options: [defaults in brackets after descriptions]
  29. Configuration:
  30.   --cache-file=FILE       cache test results in FILE
  31.   --help                  print this message
  32.   --no-create             do not create output files
  33.   --quiet, --silent       do not print \`checking...' messages
  34.   --version               print the version of autoconf that created configure
  35. Directory and file names:
  36.   --exec-prefix=PREFIX    install host dependent files in PREFIX [/usr/local]
  37.   --prefix=PREFIX         install host independent files in PREFIX [/usr/local]
  38.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  39.   --program-prefix=PREFIX prepend PREFIX to installed program names
  40.   --program-suffix=SUFFIX append SUFFIX to installed program names
  41.   --program-transform-name=PROGRAM run sed PROGRAM on installed program names
  42. Host type:
  43.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  44.   --host=HOST             configure for HOST [guessed]
  45.   --target=TARGET         configure for TARGET [TARGET=HOST]
  46. Features and packages:
  47.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  48.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  49.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  50.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  51.   --x-includes=DIR        X include files are in DIR
  52.   --x-libraries=DIR       X library files are in DIR
  53. --enable and --with options recognized:$ac_help"
  54.  
  55. # Initialize some variables set by options.
  56. # The variables have the same names as the options, with
  57. # dashes changed to underlines.
  58. build=NONE
  59. cache_file=./config.cache
  60. exec_prefix=NONE
  61. host=NONE
  62. no_create=
  63. nonopt=NONE
  64. no_recursion=
  65. prefix=NONE
  66. program_prefix=NONE
  67. program_suffix=NONE
  68. program_transform_name=s,x,x,
  69. silent=
  70. srcdir=
  71. target=NONE
  72. verbose=
  73. x_includes=NONE
  74. x_libraries=NONE
  75.  
  76. # Initialize some other variables.
  77. subdirs=
  78.  
  79. ac_prev=
  80. for ac_option
  81. do
  82.  
  83.   # If the previous option needs an argument, assign it.
  84.   if test -n "$ac_prev"; then
  85.     eval "$ac_prev=\$ac_option"
  86.     ac_prev=
  87.     continue
  88.   fi
  89.  
  90.   case "$ac_option" in
  91.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  92.   *) ac_optarg= ;;
  93.   esac
  94.  
  95.   # Accept the important Cygnus configure options, so we can diagnose typos.
  96.  
  97.   case "$ac_option" in
  98.  
  99.   -build | --build | --buil | --bui | --bu | --b)
  100.     ac_prev=build ;;
  101.   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  102.     build="$ac_optarg" ;;
  103.  
  104.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  105.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  106.     ac_prev=cache_file ;;
  107.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  108.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  109.     cache_file="$ac_optarg" ;;
  110.  
  111.   -disable-* | --disable-*)
  112.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  113.     # Reject names that are not valid shell variable names.
  114.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  115.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  116.     fi
  117.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  118.     eval "enable_${ac_feature}=no" ;;
  119.  
  120.   -enable-* | --enable-*)
  121.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  122.     # Reject names that are not valid shell variable names.
  123.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  124.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  125.     fi
  126.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  127.     case "$ac_option" in
  128.       *=*) ;;
  129.       *) ac_optarg=yes ;;
  130.     esac
  131.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  132.  
  133.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  134.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  135.   | --exec | --exe | --ex)
  136.     ac_prev=exec_prefix ;;
  137.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  138.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  139.   | --exec=* | --exe=* | --ex=*)
  140.     exec_prefix="$ac_optarg" ;;
  141.  
  142.   -gas | --gas | --ga | --g)
  143.     # Obsolete; use --with-gas.
  144.     with_gas=yes ;;
  145.  
  146.   -help | --help | --hel | --he)
  147.     cat << EOF
  148. $ac_usage
  149. EOF
  150.     exit 0 ;;
  151.  
  152.   -host | --host | --hos | --ho)
  153.     ac_prev=host ;;
  154.   -host=* | --host=* | --hos=* | --ho=*)
  155.     host="$ac_optarg" ;;
  156.  
  157.   -nfp | --nfp | --nf)
  158.     # Obsolete; use --without-fp.
  159.     with_fp=no ;;
  160.  
  161.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  162.   | --no-cr | --no-c)
  163.     no_create=yes ;;
  164.  
  165.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  166.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  167.     no_recursion=yes ;;
  168.  
  169.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  170.     ac_prev=prefix ;;
  171.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  172.     prefix="$ac_optarg" ;;
  173.  
  174.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  175.   | --program-pre | --program-pr | --program-p)
  176.     ac_prev=program_prefix ;;
  177.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  178.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  179.     program_prefix="$ac_optarg" ;;
  180.  
  181.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  182.   | --program-suf | --program-su | --program-s)
  183.     ac_prev=program_suffix ;;
  184.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  185.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  186.     program_suffix="$ac_optarg" ;;
  187.  
  188.   -program-transform-name | --program-transform-name \
  189.   | --program-transform-nam | --program-transform-na \
  190.   | --program-transform-n | --program-transform- \
  191.   | --program-transform | --program-transfor \
  192.   | --program-transfo | --program-transf \
  193.   | --program-trans | --program-tran \
  194.   | --progr-tra | --program-tr | --program-t)
  195.     ac_prev=program_transform_name ;;
  196.   -program-transform-name=* | --program-transform-name=* \
  197.   | --program-transform-nam=* | --program-transform-na=* \
  198.   | --program-transform-n=* | --program-transform-=* \
  199.   | --program-transform=* | --program-transfor=* \
  200.   | --program-transfo=* | --program-transf=* \
  201.   | --program-trans=* | --program-tran=* \
  202.   | --progr-tra=* | --program-tr=* | --program-t=*)
  203.     program_transform_name="$ac_optarg" ;;
  204.  
  205.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  206.   | -silent | --silent | --silen | --sile | --sil)
  207.     silent=yes ;;
  208.  
  209.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  210.     ac_prev=srcdir ;;
  211.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  212.     srcdir="$ac_optarg" ;;
  213.  
  214.   -target | --target | --targe | --targ | --tar | --ta | --t)
  215.     ac_prev=target ;;
  216.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  217.     target="$ac_optarg" ;;
  218.  
  219.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  220.     verbose=yes ;;
  221.  
  222.   -version | --version | --versio | --versi | --vers)
  223.     echo "configure generated by autoconf version 1.120"
  224.     exit 0 ;;
  225.  
  226.   -with-* | --with-*)
  227.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  228.     # Reject names that are not valid shell variable names.
  229.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  230.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  231.     fi
  232.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  233.     case "$ac_option" in
  234.       *=*) ;;
  235.       *) ac_optarg=yes ;;
  236.     esac
  237.     eval "with_${ac_package}='$ac_optarg'" ;;
  238.  
  239.   -without-* | --without-*)
  240.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  241.     # Reject names that are not valid shell variable names.
  242.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  243.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  244.     fi
  245.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  246.     eval "with_${ac_package}=no" ;;
  247.  
  248.   --x)
  249.     # Obsolete; use --with-x.
  250.     with_x=yes ;;
  251.  
  252.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  253.   | --x-incl | --x-inc | --x-in | --x-i)
  254.     ac_prev=x_includes ;;
  255.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  256.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  257.     x_includes="$ac_optarg" ;;
  258.  
  259.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  260.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  261.     ac_prev=x_libraries ;;
  262.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  263.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  264.     x_libraries="$ac_optarg" ;;
  265.  
  266.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  267.     ;;
  268.  
  269.   *) 
  270.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  271.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  272.     fi
  273.     if test "x$nonopt" != xNONE; then
  274.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  275.     fi
  276.     nonopt="$ac_option"
  277.     ;;
  278.  
  279.   esac
  280. done
  281.  
  282. if test -n "$ac_prev"; then
  283.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  284. fi
  285.  
  286. trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  287.  
  288. # File descriptor usage:
  289. # 0 unused; standard input
  290. # 1 file creation
  291. # 2 errors and warnings
  292. # 3 unused; some systems may open it to /dev/tty
  293. # 4 checking for... messages and results
  294. # 5 compiler messages saved in config.log
  295. if test "$silent" = yes; then
  296.   exec 4>/dev/null
  297. else
  298.   exec 4>&1
  299. fi
  300. exec 5>./config.log
  301.  
  302. echo "\
  303. This file contains any messages produced by compilers while
  304. running configure, to aid debugging if configure makes a mistake.
  305. " 1>&5
  306.  
  307. # Strip out --no-create and --no-recursion so they do not pile up.
  308. # Also quote any args containing shell metacharacters.
  309. ac_configure_args=
  310. for ac_arg
  311. do
  312.   case "$ac_arg" in
  313.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  314.   | --no-cr | --no-c) ;;
  315.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  316.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  317.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  318.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  319.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  320.   esac
  321. done
  322.  
  323. # NLS nuisances.
  324. # Only set LANG and LC_ALL to C if already set.
  325. # These must not be set unconditionally because not all systems understand
  326. # e.g. LANG=C (notably SCO).
  327. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  328. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  329.  
  330. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  331. rm -rf conftest* confdefs.h
  332. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  333. echo > confdefs.h
  334.  
  335. # A filename unique to this package, relative to the directory that
  336. # configure is in, which we can look for to find out if srcdir is correct.
  337. ac_unique_file=diff.h
  338.  
  339. # Find the source files, if location was not specified.
  340. if test -z "$srcdir"; then
  341.   ac_srcdir_defaulted=yes
  342.   # Try the directory containing this script, then its parent.
  343.   ac_prog=$0
  344.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  345.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  346.   srcdir=$ac_confdir
  347.   if test ! -r $srcdir/$ac_unique_file; then
  348.     srcdir=..
  349.   fi
  350. else
  351.   ac_srcdir_defaulted=no
  352. fi
  353. if test ! -r $srcdir/$ac_unique_file; then
  354.   if test "$ac_srcdir_defaulted" = yes; then
  355.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  356.   else
  357.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  358.   fi
  359. fi
  360.  
  361. # Prefer explicitly selected file to automatically selected ones.
  362. if test -z "$CONFIG_SITE"; then
  363.   if test "x$prefix" != xNONE; then
  364.     CONFIG_SITE=$prefix/lib/config.site
  365.   else
  366.     CONFIG_SITE=/usr/local/lib/config.site
  367.   fi
  368.   # System dependent files override system independent ones.
  369.   if test "x$exec_prefix" != xNONE && test "x$exec_prefix" != "x$prefix"; then
  370.     CONFIG_SITE="$CONFIG_SITE $exec_prefix/lib/config.site"
  371.   fi
  372. fi
  373. for ac_site_file in $CONFIG_SITE; do
  374.   if test -r "$ac_site_file"; then
  375.     echo "loading site script $ac_site_file"
  376.     . "$ac_site_file"
  377.   fi
  378. done
  379.  
  380. if test -r "$cache_file"; then
  381.   echo "loading cache $cache_file"
  382.   . $cache_file
  383. else
  384.   echo "creating cache $cache_file"
  385.   > $cache_file
  386. fi
  387.  
  388. ac_ext=c
  389. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  390. ac_cpp='$CPP $CPPFLAGS'
  391. ac_link='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext -o conftest $LIBS 1>&5 2>&5'
  392.  
  393. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  394.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  395.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  396.     ac_n= ac_c='
  397. ' ac_t='    '
  398.   else
  399.     ac_n=-n ac_c= ac_t=
  400.   fi
  401. else
  402.   ac_n= ac_c='\c' ac_t=
  403. fi
  404.  
  405.  
  406.  
  407. if test "$program_transform_name" = s,x,x,; then
  408.   program_transform_name=
  409. else
  410.   # Double any \ or $.
  411.   echo 's,\\,\\\\,g; s,\$,$$,g' > conftestsed
  412.   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
  413.   rm -f conftestsed
  414. fi
  415. test "$program_prefix" != NONE &&
  416.   program_transform_name="s,^,${program_prefix},; $program_transform_name"
  417. # Use a double $ so make ignores it.
  418. test "$program_suffix" != NONE &&
  419.   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
  420.  
  421. # sed with no file args requires a program.
  422. test "$program_transform_name" = "" && program_transform_name="s,x,x,"
  423.  
  424. # Extract the first word of "gcc", so it can be a program name with args.
  425. set dummy gcc; ac_word=$2
  426. echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
  427. if eval "test \"`echo '${'ac_cv_prog_CC'+set}'`\" = set"; then
  428.   echo $ac_n "(cached) $ac_c" 1>&4
  429. else
  430.   if test -n "$CC"; then
  431.   ac_cv_prog_CC="$CC" # Let the user override the test.
  432. else
  433.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  434.   for ac_dir in $PATH; do
  435.     test -z "$ac_dir" && ac_dir=.
  436.     if test -f $ac_dir/$ac_word; then
  437.       ac_cv_prog_CC="gcc"
  438.       break
  439.     fi
  440.   done
  441.   IFS="$ac_save_ifs"
  442.   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
  443. fi
  444. fi
  445. CC="$ac_cv_prog_CC"
  446. if test -n "$CC"; then
  447.   echo "$ac_t""$CC" 1>&4
  448. else
  449.   echo "$ac_t""no" 1>&4
  450. fi
  451.  
  452.  
  453. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&4
  454. if eval "test \"`echo '${'ac_cv_prog_gcc'+set}'`\" = set"; then
  455.   echo $ac_n "(cached) $ac_c" 1>&4
  456. else
  457.   cat > conftest.c <<EOF
  458. #ifdef __GNUC__
  459.   yes
  460. #endif
  461. EOF
  462. if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
  463.   ac_cv_prog_gcc=yes
  464. else
  465.   ac_cv_prog_gcc=no
  466. fi
  467. fi
  468. echo "$ac_t""$ac_cv_prog_gcc" 1>&4
  469. if test $ac_cv_prog_gcc = yes; then
  470.   GCC=yes
  471.   if test "${CFLAGS+set}" != set; then
  472.     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&4
  473. if eval "test \"`echo '${'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  474.   echo $ac_n "(cached) $ac_c" 1>&4
  475. else
  476.   echo 'void f(){}' > conftest.c
  477. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  478.   ac_cv_prog_gcc_g=yes
  479. else
  480.   ac_cv_prog_gcc_g=no
  481. fi
  482. rm -f conftest*
  483.  
  484. fi
  485.     echo "$ac_t""$ac_cv_prog_gcc_g" 1>&4
  486.     if test $ac_cv_prog_gcc_g = yes; then
  487.       CFLAGS="-g -O"
  488.     else
  489.       CFLAGS="-O"
  490.     fi
  491.   fi
  492. else
  493.   GCC=
  494.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  495. fi
  496.  
  497. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&4
  498. # On Suns, sometimes $CPP names a directory.
  499. if test -n "$CPP" && test -d "$CPP"; then
  500.   CPP=
  501. fi
  502. if test -z "$CPP"; then
  503. if eval "test \"`echo '${'ac_cv_prog_CPP'+set}'`\" = set"; then
  504.   echo $ac_n "(cached) $ac_c" 1>&4
  505. else
  506.     # This must be in double quotes, not single quotes, because CPP may get
  507.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  508.   CPP="${CC-cc} -E"
  509.   # On the NeXT, cc -E runs the code through the compiler's parser,
  510.   # not just through cpp.
  511.   cat > conftest.$ac_ext <<EOF
  512. #line 513 "configure"
  513. #include "confdefs.h"
  514. #include <stdio.h>
  515. Syntax Error
  516. EOF
  517. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  518. ac_err=`grep -v '^ *+' conftest.out`
  519. if test -z "$ac_err"; then
  520.   :
  521. else
  522.   echo "$ac_err" >&5
  523.   rm -rf conftest*
  524.   CPP="${CC-cc} -E -traditional-cpp"
  525.   cat > conftest.$ac_ext <<EOF
  526. #line 527 "configure"
  527. #include "confdefs.h"
  528. #include <stdio.h>
  529. Syntax Error
  530. EOF
  531. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  532. ac_err=`grep -v '^ *+' conftest.out`
  533. if test -z "$ac_err"; then
  534.   :
  535. else
  536.   echo "$ac_err" >&5
  537.   rm -rf conftest*
  538.   CPP=/lib/cpp
  539. fi
  540. rm -f conftest*
  541. fi
  542. rm -f conftest*
  543.   ac_cv_prog_CPP="$CPP"
  544. fi
  545. fi
  546. CPP="$ac_cv_prog_CPP"
  547. echo "$ac_t""$CPP" 1>&4
  548.  
  549. ac_aux_dir=
  550. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  551.   if test -f $ac_dir/install-sh; then
  552.     ac_aux_dir=$ac_dir
  553.     ac_install_sh="$ac_aux_dir/install-sh -c"
  554.     break
  555.   elif test -f $ac_dir/install.sh; then
  556.     ac_aux_dir=$ac_dir
  557.     ac_install_sh="$ac_aux_dir/install.sh -c"
  558.     break
  559.   fi
  560. done
  561. if test -z "$ac_aux_dir"; then
  562.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  563. fi
  564. ac_config_guess=$ac_aux_dir/config.guess
  565. ac_config_sub=$ac_aux_dir/config.sub
  566. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  567.  
  568. # Find a good install program.  We prefer a C program (faster),
  569. # so one script is as good as another.  But avoid the broken or
  570. # incompatible versions:
  571. # SysV /etc/install, /usr/sbin/install
  572. # SunOS /usr/etc/install
  573. # IRIX /sbin/install
  574. # AIX /bin/install
  575. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  576. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  577. # ./install, which can be erroneously created by make from ./install.sh.
  578. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&4
  579. if test -z "$INSTALL"; then
  580. if eval "test \"`echo '${'ac_cv_path_install'+set}'`\" = set"; then
  581.   echo $ac_n "(cached) $ac_c" 1>&4
  582. else
  583.     IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  584.   for ac_dir in $PATH; do
  585.     case "$ac_dir" in
  586.     ''|.|/etc|/usr/sbin|/usr/etc|/sbin|/usr/afsws/bin|/usr/ucb) ;;
  587.     *)
  588.       # OSF1 and SCO ODT 3.0 have their own names for install.
  589.       for ac_prog in ginstall installbsd scoinst install; do
  590.         if test -f $ac_dir/$ac_prog; then
  591.       if test $ac_prog = install &&
  592.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  593.         # AIX install.  It has an incompatible calling convention.
  594.         # OSF/1 installbsd also uses dspmsg, but is usable.
  595.         :
  596.       else
  597.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  598.         break 2
  599.       fi
  600.     fi
  601.       done
  602.       ;;
  603.     esac
  604.   done
  605.   IFS="$ac_save_ifs"
  606.   # As a last resort, use the slow shell script.
  607.   test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
  608. fi
  609.   INSTALL="$ac_cv_path_install"
  610. fi
  611. echo "$ac_t""$INSTALL" 1>&4
  612.  
  613. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  614. # It thinks the first close brace ends the variable substitution.
  615. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  616.  
  617. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  618.  
  619. echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&4
  620. if test -d /etc/conf/kconfig.d &&
  621.   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  622. then
  623.   echo "$ac_t""yes" 1>&4
  624.   ISC=yes # If later tests want to check for ISC.
  625.   cat >> confdefs.h <<\EOF
  626. #define _POSIX_SOURCE 1
  627. EOF
  628.  
  629.   if test "$GCC" = yes; then
  630.     CC="$CC -posix"
  631.   else
  632.     CC="$CC -Xp"
  633.   fi
  634. else
  635.   echo "$ac_t""no" 1>&4
  636.   ISC=
  637. fi
  638.  
  639. ac_safe=`echo "minix/config.h" | tr './' '__'`
  640. echo $ac_n "checking for minix/config.h""... $ac_c" 1>&4
  641. if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  642.   echo $ac_n "(cached) $ac_c" 1>&4
  643. else
  644.   cat > conftest.$ac_ext <<EOF
  645. #line 646 "configure"
  646. #include "confdefs.h"
  647. #include <minix/config.h>
  648. EOF
  649. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  650. ac_err=`grep -v '^ *+' conftest.out`
  651. if test -z "$ac_err"; then
  652.   rm -rf conftest*
  653.   eval "ac_cv_header_$ac_safe=yes"
  654. else
  655.   echo "$ac_err" >&5
  656.   rm -rf conftest*
  657.   eval "ac_cv_header_$ac_safe=no"
  658. fi
  659. rm -f conftest*
  660. fi
  661. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  662.   echo "$ac_t""yes" 1>&4
  663.   MINIX=yes
  664. else
  665.   echo "$ac_t""no" 1>&4
  666. MINIX=
  667. fi
  668.  
  669. if test "$MINIX" = yes; then
  670.   cat >> confdefs.h <<\EOF
  671. #define _POSIX_SOURCE 1
  672. EOF
  673.  
  674.   cat >> confdefs.h <<\EOF
  675. #define _POSIX_1_SOURCE 2
  676. EOF
  677.  
  678.   cat >> confdefs.h <<\EOF
  679. #define _MINIX 1
  680. EOF
  681.  
  682. fi
  683.  
  684. echo $ac_n "checking for working const""... $ac_c" 1>&4
  685. if eval "test \"`echo '${'ac_cv_c_const'+set}'`\" = set"; then
  686.   echo $ac_n "(cached) $ac_c" 1>&4
  687. else
  688.   cat > conftest.$ac_ext <<EOF
  689. #line 690 "configure"
  690. #include "confdefs.h"
  691.  
  692. int main() { return 0; }
  693. int t() {
  694.  
  695. /* Ultrix mips cc rejects this.  */
  696. typedef int charset[2]; const charset x;
  697. /* SunOS 4.1.1 cc rejects this.  */
  698. char const *const *ccp;
  699. char **p;
  700. /* NEC SVR4.0.2 mips cc rejects this.  */
  701. struct point {int x, y;};
  702. static struct point const zero;
  703. /* AIX XL C 1.02.0.0 rejects this.
  704.    It does not let you subtract one const X* pointer from another in an arm
  705.    of an if-expression whose if-part is not a constant expression */
  706. const char *g = "string";
  707. ccp = &g + (g ? g-g : 0);
  708. /* HPUX 7.0 cc rejects these. */
  709. ++ccp;
  710. p = (char**) ccp;
  711. ccp = (char const *const *) p;
  712. { /* SCO 3.2v4 cc rejects this.  */
  713.   char *t;
  714.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  715.  
  716.   *t++ = 0;
  717. }
  718. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  719.   int x[] = {25, 17};
  720.   const int *foo = &x[0];
  721.   ++foo;
  722. }
  723. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  724.   typedef const int *iptr;
  725.   iptr p = 0;
  726.   ++p;
  727. }
  728. { /* AIX XL C 1.02.0.0 rejects this saying
  729.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  730.   struct s { int j; const int *ap[3]; };
  731.   struct s *b; b->j = 5;
  732. }
  733. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  734.   const int foo = 10;
  735. }
  736.  
  737. ; return 0; }
  738. EOF
  739. if eval $ac_link; then
  740.   rm -rf conftest*
  741.   ac_cv_c_const=yes
  742. else
  743.   rm -rf conftest*
  744.   ac_cv_c_const=no
  745. fi
  746. rm -f conftest*
  747.  
  748. fi
  749. echo "$ac_t""$ac_cv_c_const" 1>&4
  750. if test $ac_cv_c_const = no; then
  751.   cat >> confdefs.h <<\EOF
  752. #define const 
  753. EOF
  754.  
  755. fi
  756.  
  757. # If we cannot run a trivial program, we must be cross compiling.
  758. echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&4
  759. if eval "test \"`echo '${'ac_cv_c_cross'+set}'`\" = set"; then
  760.   echo $ac_n "(cached) $ac_c" 1>&4
  761. else
  762.   if test "$cross_compiling" = yes; then
  763.   ac_cv_cross=yes
  764. else
  765. cat > conftest.$ac_ext <<EOF
  766. #line 767 "configure"
  767. #include "confdefs.h"
  768. main(){return(0);}
  769. EOF
  770. eval $ac_link
  771. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  772.   ac_cv_c_cross=no
  773. else
  774.   ac_cv_c_cross=yes
  775. fi
  776. fi
  777. rm -fr conftest*
  778. fi
  779. cross_compiling=$ac_cv_c_cross
  780. echo "$ac_t""$ac_cv_c_cross" 1>&4
  781.  
  782. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&4
  783. if eval "test \"`echo '${'ac_cv_header_stdc'+set}'`\" = set"; then
  784.   echo $ac_n "(cached) $ac_c" 1>&4
  785. else
  786.   cat > conftest.$ac_ext <<EOF
  787. #line 788 "configure"
  788. #include "confdefs.h"
  789. #include <stdlib.h>
  790. #include <stdarg.h>
  791. #include <string.h>
  792. #include <float.h>
  793. EOF
  794. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  795. ac_err=`grep -v '^ *+' conftest.out`
  796. if test -z "$ac_err"; then
  797.   rm -rf conftest*
  798.   ac_cv_header_stdc=yes
  799. else
  800.   echo "$ac_err" >&5
  801.   rm -rf conftest*
  802.   ac_cv_header_stdc=no
  803. fi
  804. rm -f conftest*
  805.  
  806. if test $ac_cv_header_stdc = yes; then
  807.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  808. cat > conftest.$ac_ext <<EOF
  809. #line 810 "configure"
  810. #include "confdefs.h"
  811. #include <string.h>
  812. EOF
  813. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  814.   egrep "memchr" >/dev/null 2>&1; then
  815.   :
  816. else
  817.   rm -rf conftest*
  818.   ac_cv_header_stdc=no
  819. fi
  820. rm -f conftest*
  821.  
  822. fi
  823.  
  824. if test $ac_cv_header_stdc = yes; then
  825.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  826. cat > conftest.$ac_ext <<EOF
  827. #line 828 "configure"
  828. #include "confdefs.h"
  829. #include <stdlib.h>
  830. EOF
  831. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  832.   egrep "free" >/dev/null 2>&1; then
  833.   :
  834. else
  835.   rm -rf conftest*
  836.   ac_cv_header_stdc=no
  837. fi
  838. rm -f conftest*
  839.  
  840. fi
  841.  
  842. if test $ac_cv_header_stdc = yes; then
  843.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  844. if test "$cross_compiling" = yes; then
  845.   ac_cv_header_stdc=no
  846. else
  847. cat > conftest.$ac_ext <<EOF
  848. #line 849 "configure"
  849. #include "confdefs.h"
  850. #include <ctype.h>
  851. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  852. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  853. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  854. int main () { int i; for (i = 0; i < 256; i++)
  855. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  856. exit (0); }
  857.  
  858. EOF
  859. eval $ac_link
  860. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  861.   :
  862. else
  863.   ac_cv_header_stdc=no
  864. fi
  865. fi
  866. rm -fr conftest*
  867. fi
  868. fi
  869. echo "$ac_t""$ac_cv_header_stdc" 1>&4
  870. if test $ac_cv_header_stdc = yes; then
  871.   cat >> confdefs.h <<\EOF
  872. #define STDC_HEADERS 1
  873. EOF
  874.  
  875. fi
  876.  
  877. for ac_hdr in unistd.h fcntl.h limits.h stdlib.h string.h sys/file.h time.h
  878. do
  879. ac_safe=`echo "$ac_hdr" | tr './' '__'`
  880. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&4
  881. if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  882.   echo $ac_n "(cached) $ac_c" 1>&4
  883. else
  884.   cat > conftest.$ac_ext <<EOF
  885. #line 886 "configure"
  886. #include "confdefs.h"
  887. #include <$ac_hdr>
  888. EOF
  889. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  890. ac_err=`grep -v '^ *+' conftest.out`
  891. if test -z "$ac_err"; then
  892.   rm -rf conftest*
  893.   eval "ac_cv_header_$ac_safe=yes"
  894. else
  895.   echo "$ac_err" >&5
  896.   rm -rf conftest*
  897.   eval "ac_cv_header_$ac_safe=no"
  898. fi
  899. rm -f conftest*
  900. fi
  901. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  902.   echo "$ac_t""yes" 1>&4
  903.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
  904.   cat >> confdefs.h <<EOF
  905. #define $ac_tr_hdr 1
  906. EOF
  907.  
  908. else
  909.   echo "$ac_t""no" 1>&4
  910. fi
  911. done
  912.  
  913. ac_header_dirent=no
  914. for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
  915. do
  916. ac_safe=`echo "$ac_hdr" | tr './' '__'`
  917. echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&4
  918. if eval "test \"`echo '${'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
  919.   echo $ac_n "(cached) $ac_c" 1>&4
  920. else
  921.   cat > conftest.$ac_ext <<EOF
  922. #line 923 "configure"
  923. #include "confdefs.h"
  924. #include <sys/types.h>
  925. #include <$ac_hdr>
  926. int main() { return 0; }
  927. int t() {
  928. DIR *dirp = 0;
  929. ; return 0; }
  930. EOF
  931. if eval $ac_link; then
  932.   rm -rf conftest*
  933.   eval "ac_cv_header_dirent_$ac_safe=yes"
  934. else
  935.   rm -rf conftest*
  936.   eval "ac_cv_header_dirent_$ac_safe=no"
  937. fi
  938. rm -f conftest*
  939.  
  940. fi
  941. if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
  942.   echo "$ac_t""yes" 1>&4
  943.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
  944.   cat >> confdefs.h <<EOF
  945. #define $ac_tr_hdr 1
  946. EOF
  947.  ac_header_dirent=$ac_hdr; break
  948. else
  949.   echo "$ac_t""no" 1>&4
  950. fi
  951. done
  952. # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix,
  953. # and -lx contains other useful things as well.  (FIXME what are they?)
  954. if test $ac_header_dirent = dirent.h; then
  955. echo $ac_n "checking for -ldir""... $ac_c" 1>&4
  956. if eval "test \"`echo '${'ac_cv_lib_dir'+set}'`\" = set"; then
  957.   echo $ac_n "(cached) $ac_c" 1>&4
  958. else
  959.   ac_save_LIBS="$LIBS"
  960. LIBS="$LIBS -ldir "
  961. cat > conftest.$ac_ext <<EOF
  962. #line 963 "configure"
  963. #include "confdefs.h"
  964.  
  965. int main() { return 0; }
  966. int t() {
  967. opendir()
  968. ; return 0; }
  969. EOF
  970. if eval $ac_link; then
  971.   rm -rf conftest*
  972.   eval "ac_cv_lib_dir=yes"
  973. else
  974.   rm -rf conftest*
  975.   eval "ac_cv_lib_dir=no"
  976. fi
  977. rm -f conftest*
  978. LIBS="$ac_save_LIBS"
  979.  
  980. fi
  981. if eval "test \"`echo '$ac_cv_lib_'dir`\" = yes"; then
  982.   echo "$ac_t""yes" 1>&4
  983.   LIBS="$LIBS -ldir"
  984. else
  985.   echo "$ac_t""no" 1>&4
  986. fi
  987.  
  988. fi
  989. echo $ac_n "checking for -lx""... $ac_c" 1>&4
  990. if eval "test \"`echo '${'ac_cv_lib_x'+set}'`\" = set"; then
  991.   echo $ac_n "(cached) $ac_c" 1>&4
  992. else
  993.   ac_save_LIBS="$LIBS"
  994. LIBS="$LIBS -lx "
  995. cat > conftest.$ac_ext <<EOF
  996. #line 997 "configure"
  997. #include "confdefs.h"
  998.  
  999. int main() { return 0; }
  1000. int t() {
  1001. main()
  1002. ; return 0; }
  1003. EOF
  1004. if eval $ac_link; then
  1005.   rm -rf conftest*
  1006.   eval "ac_cv_lib_x=yes"
  1007. else
  1008.   rm -rf conftest*
  1009.   eval "ac_cv_lib_x=no"
  1010. fi
  1011. rm -f conftest*
  1012. LIBS="$ac_save_LIBS"
  1013.  
  1014. fi
  1015. if eval "test \"`echo '$ac_cv_lib_'x`\" = yes"; then
  1016.   echo "$ac_t""yes" 1>&4
  1017.   LIBS="$LIBS -lx"
  1018. else
  1019.   echo "$ac_t""no" 1>&4
  1020. fi
  1021.  
  1022.  
  1023. echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&4
  1024. if eval "test \"`echo '${'ac_cv_header_stat_broken'+set}'`\" = set"; then
  1025.   echo $ac_n "(cached) $ac_c" 1>&4
  1026. else
  1027.   cat > conftest.$ac_ext <<EOF
  1028. #line 1029 "configure"
  1029. #include "confdefs.h"
  1030. #include <sys/types.h>
  1031. #include <sys/stat.h>
  1032. #ifdef S_ISBLK
  1033. # if S_ISBLK (S_IFDIR)
  1034. You lose.
  1035. # endif
  1036. # ifdef S_IFCHR
  1037. #  if S_ISBLK (S_IFCHR)
  1038. You lose.
  1039. #  endif
  1040. # endif
  1041. #endif
  1042.  
  1043. #ifdef S_ISLNK
  1044. # if S_ISLNK (S_IFREG)
  1045. You lose.
  1046. # endif
  1047. #endif
  1048.  
  1049. #ifdef S_ISSOCK
  1050. # if S_ISSOCK (S_IFREG)
  1051. You lose.
  1052. # endif
  1053. #endif
  1054.  
  1055. EOF
  1056. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1057.   egrep "You lose" >/dev/null 2>&1; then
  1058.   rm -rf conftest*
  1059.   ac_cv_header_stat_broken=yes
  1060. else
  1061.   rm -rf conftest*
  1062.   ac_cv_header_stat_broken=no
  1063. fi
  1064. rm -f conftest*
  1065.  
  1066. fi
  1067. echo "$ac_t""$ac_cv_header_stat_broken" 1>&4
  1068. if test $ac_cv_header_stat_broken = yes; then
  1069.   cat >> confdefs.h <<\EOF
  1070. #define STAT_MACROS_BROKEN 1
  1071. EOF
  1072.  
  1073. fi
  1074.  
  1075. echo $ac_n "checking for sys/wait.h that is compatible with Posix.1""... $ac_c" 1>&4
  1076. if eval "test \"`echo '${'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
  1077.   echo $ac_n "(cached) $ac_c" 1>&4
  1078. else
  1079.   cat > conftest.$ac_ext <<EOF
  1080. #line 1081 "configure"
  1081. #include "confdefs.h"
  1082. #include <sys/types.h>
  1083. #include <sys/wait.h>
  1084. #ifndef WEXITSTATUS
  1085. #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
  1086. #endif
  1087. #ifndef WIFEXITED
  1088. #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
  1089. #endif
  1090. int main() { return 0; }
  1091. int t() {
  1092. int s;
  1093. wait (&s);
  1094. waitpid (0, &s, 0);
  1095. s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
  1096. ; return 0; }
  1097. EOF
  1098. if eval $ac_link; then
  1099.   rm -rf conftest*
  1100.   ac_cv_header_sys_wait_h=yes
  1101. else
  1102.   rm -rf conftest*
  1103.   ac_cv_header_sys_wait_h=no
  1104. fi
  1105. rm -f conftest*
  1106.  
  1107. fi
  1108. echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&4
  1109. if test $ac_cv_header_sys_wait_h = yes; then
  1110.   cat >> confdefs.h <<\EOF
  1111. #define HAVE_SYS_WAIT_H 1
  1112. EOF
  1113.  
  1114. fi
  1115.  
  1116. echo $ac_n "checking for pid_t""... $ac_c" 1>&4
  1117. if eval "test \"`echo '${'ac_cv_type_pid_t'+set}'`\" = set"; then
  1118.   echo $ac_n "(cached) $ac_c" 1>&4
  1119. else
  1120.   cat > conftest.$ac_ext <<EOF
  1121. #line 1122 "configure"
  1122. #include "confdefs.h"
  1123. #include <sys/types.h>
  1124. #if STDC_HEADERS
  1125. #include <stdlib.h>
  1126. #endif
  1127. EOF
  1128. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1129.   egrep "pid_t" >/dev/null 2>&1; then
  1130.   rm -rf conftest*
  1131.   ac_cv_type_pid_t=yes
  1132. else
  1133.   rm -rf conftest*
  1134.   ac_cv_type_pid_t=no
  1135. fi
  1136. rm -f conftest*
  1137.  
  1138. fi
  1139. echo "$ac_t""$ac_cv_type_pid_t" 1>&4
  1140. if test $ac_cv_type_pid_t = no; then
  1141.   cat >> confdefs.h <<\EOF
  1142. #define pid_t int
  1143. EOF
  1144.  
  1145. fi
  1146.  
  1147. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&4
  1148. if eval "test \"`echo '${'ac_cv_type_signal'+set}'`\" = set"; then
  1149.   echo $ac_n "(cached) $ac_c" 1>&4
  1150. else
  1151.   cat > conftest.$ac_ext <<EOF
  1152. #line 1153 "configure"
  1153. #include "confdefs.h"
  1154. #include <sys/types.h>
  1155. #include <signal.h>
  1156. #ifdef signal
  1157. #undef signal
  1158. #endif
  1159. extern void (*signal ()) ();
  1160. int main() { return 0; }
  1161. int t() {
  1162. int i;
  1163. ; return 0; }
  1164. EOF
  1165. if eval $ac_link; then
  1166.   rm -rf conftest*
  1167.   ac_cv_type_signal=void
  1168. else
  1169.   rm -rf conftest*
  1170.   ac_cv_type_signal=int
  1171. fi
  1172. rm -f conftest*
  1173.  
  1174. fi
  1175. echo "$ac_t""$ac_cv_type_signal" 1>&4
  1176. cat >> confdefs.h <<EOF
  1177. #define RETSIGTYPE $ac_cv_type_signal
  1178. EOF
  1179.  
  1180.  
  1181. for ac_func in dup2 memchr sigaction strchr strerror tmpnam
  1182. do
  1183. echo $ac_n "checking for $ac_func""... $ac_c" 1>&4
  1184. if eval "test \"`echo '${'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1185.   echo $ac_n "(cached) $ac_c" 1>&4
  1186. else
  1187.   cat > conftest.$ac_ext <<EOF
  1188. #line 1189 "configure"
  1189. #include "confdefs.h"
  1190. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1191. int main() { return 0; }
  1192. int t() {
  1193.  
  1194. /* The GNU C library defines this for functions which it implements
  1195.     to always fail with ENOSYS.  Some functions are actually named
  1196.     something starting with __ and the normal name is an alias.  */
  1197. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1198. choke me
  1199. #else
  1200. /* Override any gcc2 internal prototype to avoid an error.  */
  1201. char $ac_func(); $ac_func();
  1202. #endif
  1203.  
  1204. ; return 0; }
  1205. EOF
  1206. if eval $ac_link; then
  1207.   rm -rf conftest*
  1208.   eval "ac_cv_func_$ac_func=yes"
  1209. else
  1210.   rm -rf conftest*
  1211.   eval "ac_cv_func_$ac_func=no"
  1212. fi
  1213. rm -f conftest*
  1214.  
  1215. fi
  1216. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1217.   echo "$ac_t""yes" 1>&4
  1218.     ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  1219.   cat >> confdefs.h <<EOF
  1220. #define $ac_tr_func 1
  1221. EOF
  1222.  
  1223. else
  1224.   echo "$ac_t""no" 1>&4
  1225. fi
  1226. done
  1227.  
  1228. for ac_func in memchr waitpid
  1229. do
  1230. echo $ac_n "checking for $ac_func""... $ac_c" 1>&4
  1231. if eval "test \"`echo '${'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1232.   echo $ac_n "(cached) $ac_c" 1>&4
  1233. else
  1234.   cat > conftest.$ac_ext <<EOF
  1235. #line 1236 "configure"
  1236. #include "confdefs.h"
  1237. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1238. int main() { return 0; }
  1239. int t() {
  1240.  
  1241. /* The GNU C library defines this for functions which it implements
  1242.     to always fail with ENOSYS.  Some functions are actually named
  1243.     something starting with __ and the normal name is an alias.  */
  1244. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1245. choke me
  1246. #else
  1247. /* Override any gcc2 internal prototype to avoid an error.  */
  1248. char $ac_func(); $ac_func();
  1249. #endif
  1250.  
  1251. ; return 0; }
  1252. EOF
  1253. if eval $ac_link; then
  1254.   rm -rf conftest*
  1255.   eval "ac_cv_func_$ac_func=yes"
  1256. else
  1257.   rm -rf conftest*
  1258.   eval "ac_cv_func_$ac_func=no"
  1259. fi
  1260. rm -f conftest*
  1261.  
  1262. fi
  1263. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1264.   echo "$ac_t""yes" 1>&4
  1265.   :
  1266. else
  1267.   echo "$ac_t""no" 1>&4
  1268. LIBOBJS="$LIBOBJS ${ac_func}.o"
  1269. fi
  1270.  
  1271. done
  1272.  
  1273. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  1274. # for constant arguments.  Useless!
  1275. echo $ac_n "checking for working alloca.h""... $ac_c" 1>&4
  1276. if eval "test \"`echo '${'ac_cv_header_alloca_h'+set}'`\" = set"; then
  1277.   echo $ac_n "(cached) $ac_c" 1>&4
  1278. else
  1279.   cat > conftest.$ac_ext <<EOF
  1280. #line 1281 "configure"
  1281. #include "confdefs.h"
  1282. #include <alloca.h>
  1283. int main() { return 0; }
  1284. int t() {
  1285. char *p = alloca(2 * sizeof(int));
  1286. ; return 0; }
  1287. EOF
  1288. if eval $ac_link; then
  1289.   rm -rf conftest*
  1290.   ac_cv_header_alloca_h=yes
  1291. else
  1292.   rm -rf conftest*
  1293.   ac_cv_header_alloca_h=no
  1294. fi
  1295. rm -f conftest*
  1296.  
  1297. fi
  1298. echo "$ac_t""$ac_cv_header_alloca_h" 1>&4
  1299. if test $ac_cv_header_alloca_h = yes; then
  1300.   cat >> confdefs.h <<\EOF
  1301. #define HAVE_ALLOCA_H 1
  1302. EOF
  1303.  
  1304. fi
  1305.  
  1306. echo $ac_n "checking for alloca""... $ac_c" 1>&4
  1307. if eval "test \"`echo '${'ac_cv_func_alloca'+set}'`\" = set"; then
  1308.   echo $ac_n "(cached) $ac_c" 1>&4
  1309. else
  1310.   cat > conftest.$ac_ext <<EOF
  1311. #line 1312 "configure"
  1312. #include "confdefs.h"
  1313.  
  1314. #ifdef __GNUC__
  1315. # define alloca __builtin_alloca
  1316. #else
  1317. # if HAVE_ALLOCA_H
  1318. #  include <alloca.h>
  1319. # else
  1320. #  ifdef _AIX
  1321.  #pragma alloca
  1322. #  else
  1323. #   ifndef alloca /* predefined by HP cc +Olibcalls */
  1324. char *alloca ();
  1325. #   endif
  1326. #  endif
  1327. # endif
  1328. #endif
  1329.  
  1330. int main() { return 0; }
  1331. int t() {
  1332. char *p = (char *) alloca(1);
  1333. ; return 0; }
  1334. EOF
  1335. if eval $ac_link; then
  1336.   rm -rf conftest*
  1337.   ac_cv_func_alloca=yes
  1338. else
  1339.   rm -rf conftest*
  1340.   ac_cv_func_alloca=no
  1341. fi
  1342. rm -f conftest*
  1343.  
  1344. fi
  1345. echo "$ac_t""$ac_cv_func_alloca" 1>&4
  1346. if test $ac_cv_func_alloca = yes; then
  1347.   cat >> confdefs.h <<\EOF
  1348. #define HAVE_ALLOCA 1
  1349. EOF
  1350.  
  1351. fi
  1352.  
  1353. if test $ac_cv_func_alloca = no; then
  1354.   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  1355.   # that cause trouble.  Some versions do not even contain alloca or
  1356.   # contain a buggy version.  If you still want to use their alloca,
  1357.   # use ar to extract alloca.o from them instead of compiling alloca.c.
  1358.   ALLOCA=alloca.o
  1359.   cat >> confdefs.h <<\EOF
  1360. #define C_ALLOCA 1
  1361. EOF
  1362.  
  1363.  
  1364. echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&4
  1365. if eval "test \"`echo '${'ac_cv_os_cray'+set}'`\" = set"; then
  1366.   echo $ac_n "(cached) $ac_c" 1>&4
  1367. else
  1368.   cat > conftest.$ac_ext <<EOF
  1369. #line 1370 "configure"
  1370. #include "confdefs.h"
  1371. #if defined(CRAY) && ! defined(CRAY2)
  1372. webecray
  1373. #else
  1374. wenotbecray
  1375. #endif
  1376.  
  1377. EOF
  1378. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1379.   egrep "webecray" >/dev/null 2>&1; then
  1380.   rm -rf conftest*
  1381.   ac_cv_os_cray=yes
  1382. else
  1383.   rm -rf conftest*
  1384.   ac_cv_os_cray=no
  1385. fi
  1386. rm -f conftest*
  1387.  
  1388. fi
  1389. echo "$ac_t""$ac_cv_os_cray" 1>&4
  1390. if test $ac_cv_os_cray = yes; then
  1391. echo $ac_n "checking for _getb67""... $ac_c" 1>&4
  1392. if eval "test \"`echo '${'ac_cv_func__getb67'+set}'`\" = set"; then
  1393.   echo $ac_n "(cached) $ac_c" 1>&4
  1394. else
  1395.   cat > conftest.$ac_ext <<EOF
  1396. #line 1397 "configure"
  1397. #include "confdefs.h"
  1398. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1399. int main() { return 0; }
  1400. int t() {
  1401.  
  1402. /* The GNU C library defines this for functions which it implements
  1403.     to always fail with ENOSYS.  Some functions are actually named
  1404.     something starting with __ and the normal name is an alias.  */
  1405. #if defined (__stub__getb67) || defined (__stub____getb67)
  1406. choke me
  1407. #else
  1408. /* Override any gcc2 internal prototype to avoid an error.  */
  1409. char _getb67(); _getb67();
  1410. #endif
  1411.  
  1412. ; return 0; }
  1413. EOF
  1414. if eval $ac_link; then
  1415.   rm -rf conftest*
  1416.   eval "ac_cv_func__getb67=yes"
  1417. else
  1418.   rm -rf conftest*
  1419.   eval "ac_cv_func__getb67=no"
  1420. fi
  1421. rm -f conftest*
  1422.  
  1423. fi
  1424. if eval "test \"`echo '$ac_cv_func_'_getb67`\" = yes"; then
  1425.   echo "$ac_t""yes" 1>&4
  1426.   cat >> confdefs.h <<\EOF
  1427. #define CRAY_STACKSEG_END _getb67
  1428. EOF
  1429.  
  1430. else
  1431.   echo "$ac_t""no" 1>&4
  1432. echo $ac_n "checking for GETB67""... $ac_c" 1>&4
  1433. if eval "test \"`echo '${'ac_cv_func_GETB67'+set}'`\" = set"; then
  1434.   echo $ac_n "(cached) $ac_c" 1>&4
  1435. else
  1436.   cat > conftest.$ac_ext <<EOF
  1437. #line 1438 "configure"
  1438. #include "confdefs.h"
  1439. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1440. int main() { return 0; }
  1441. int t() {
  1442.  
  1443. /* The GNU C library defines this for functions which it implements
  1444.     to always fail with ENOSYS.  Some functions are actually named
  1445.     something starting with __ and the normal name is an alias.  */
  1446. #if defined (__stub_GETB67) || defined (__stub___GETB67)
  1447. choke me
  1448. #else
  1449. /* Override any gcc2 internal prototype to avoid an error.  */
  1450. char GETB67(); GETB67();
  1451. #endif
  1452.  
  1453. ; return 0; }
  1454. EOF
  1455. if eval $ac_link; then
  1456.   rm -rf conftest*
  1457.   eval "ac_cv_func_GETB67=yes"
  1458. else
  1459.   rm -rf conftest*
  1460.   eval "ac_cv_func_GETB67=no"
  1461. fi
  1462. rm -f conftest*
  1463.  
  1464. fi
  1465. if eval "test \"`echo '$ac_cv_func_'GETB67`\" = yes"; then
  1466.   echo "$ac_t""yes" 1>&4
  1467.   cat >> confdefs.h <<\EOF
  1468. #define CRAY_STACKSEG_END GETB67
  1469. EOF
  1470.  
  1471. else
  1472.   echo "$ac_t""no" 1>&4
  1473. echo $ac_n "checking for getb67""... $ac_c" 1>&4
  1474. if eval "test \"`echo '${'ac_cv_func_getb67'+set}'`\" = set"; then
  1475.   echo $ac_n "(cached) $ac_c" 1>&4
  1476. else
  1477.   cat > conftest.$ac_ext <<EOF
  1478. #line 1479 "configure"
  1479. #include "confdefs.h"
  1480. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1481. int main() { return 0; }
  1482. int t() {
  1483.  
  1484. /* The GNU C library defines this for functions which it implements
  1485.     to always fail with ENOSYS.  Some functions are actually named
  1486.     something starting with __ and the normal name is an alias.  */
  1487. #if defined (__stub_getb67) || defined (__stub___getb67)
  1488. choke me
  1489. #else
  1490. /* Override any gcc2 internal prototype to avoid an error.  */
  1491. char getb67(); getb67();
  1492. #endif
  1493.  
  1494. ; return 0; }
  1495. EOF
  1496. if eval $ac_link; then
  1497.   rm -rf conftest*
  1498.   eval "ac_cv_func_getb67=yes"
  1499. else
  1500.   rm -rf conftest*
  1501.   eval "ac_cv_func_getb67=no"
  1502. fi
  1503. rm -f conftest*
  1504.  
  1505. fi
  1506. if eval "test \"`echo '$ac_cv_func_'getb67`\" = yes"; then
  1507.   echo "$ac_t""yes" 1>&4
  1508.   cat >> confdefs.h <<\EOF
  1509. #define CRAY_STACKSEG_END getb67
  1510. EOF
  1511.  
  1512. else
  1513.   echo "$ac_t""no" 1>&4
  1514. fi
  1515.  
  1516. fi
  1517.  
  1518. fi
  1519.  
  1520. fi
  1521.  
  1522. echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&4
  1523. if eval "test \"`echo '${'ac_cv_c_stack_direction'+set}'`\" = set"; then
  1524.   echo $ac_n "(cached) $ac_c" 1>&4
  1525. else
  1526.   if test "$cross_compiling" = yes; then
  1527.   ac_cv_c_stack_direction=0
  1528. else
  1529. cat > conftest.$ac_ext <<EOF
  1530. #line 1531 "configure"
  1531. #include "confdefs.h"
  1532. find_stack_direction ()
  1533. {
  1534.   static char *addr = 0;
  1535.   auto char dummy;
  1536.   if (addr == 0)
  1537.     {
  1538.       addr = &dummy;
  1539.       return find_stack_direction ();
  1540.     }
  1541.   else
  1542.     return (&dummy > addr) ? 1 : -1;
  1543. }
  1544. main ()
  1545. {
  1546.   exit (find_stack_direction() < 0);
  1547. }
  1548. EOF
  1549. eval $ac_link
  1550. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1551.   ac_cv_c_stack_direction=1
  1552. else
  1553.   ac_cv_c_stack_direction=-1
  1554. fi
  1555. fi
  1556. rm -fr conftest*
  1557. fi
  1558. echo "$ac_t""$ac_cv_c_stack_direction" 1>&4
  1559. cat >> confdefs.h <<EOF
  1560. #define STACK_DIRECTION $ac_cv_c_stack_direction
  1561. EOF
  1562.  
  1563. fi
  1564.  
  1565. echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&4
  1566. if eval "test \"`echo '${'ac_cv_func_closedir_void'+set}'`\" = set"; then
  1567.   echo $ac_n "(cached) $ac_c" 1>&4
  1568. else
  1569.   if test "$cross_compiling" = yes; then
  1570.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1571. else
  1572. cat > conftest.$ac_ext <<EOF
  1573. #line 1574 "configure"
  1574. #include "confdefs.h"
  1575. #include <sys/types.h>
  1576. #include <$ac_header_dirent>
  1577. int closedir(); main() { exit(closedir(opendir(".")) != 0); }
  1578. EOF
  1579. eval $ac_link
  1580. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1581.   ac_cv_func_closedir_void=no
  1582. else
  1583.   ac_cv_func_closedir_void=yes
  1584. fi
  1585. fi
  1586. rm -fr conftest*
  1587. fi
  1588. echo "$ac_t""$ac_cv_func_closedir_void" 1>&4
  1589. if test $ac_cv_func_closedir_void = yes; then
  1590.   cat >> confdefs.h <<\EOF
  1591. #define CLOSEDIR_VOID 1
  1592. EOF
  1593.  
  1594. fi
  1595.  
  1596. ac_safe=`echo "vfork.h" | tr './' '__'`
  1597. echo $ac_n "checking for vfork.h""... $ac_c" 1>&4
  1598. if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1599.   echo $ac_n "(cached) $ac_c" 1>&4
  1600. else
  1601.   cat > conftest.$ac_ext <<EOF
  1602. #line 1603 "configure"
  1603. #include "confdefs.h"
  1604. #include <vfork.h>
  1605. EOF
  1606. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1607. ac_err=`grep -v '^ *+' conftest.out`
  1608. if test -z "$ac_err"; then
  1609.   rm -rf conftest*
  1610.   eval "ac_cv_header_$ac_safe=yes"
  1611. else
  1612.   echo "$ac_err" >&5
  1613.   rm -rf conftest*
  1614.   eval "ac_cv_header_$ac_safe=no"
  1615. fi
  1616. rm -f conftest*
  1617. fi
  1618. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1619.   echo "$ac_t""yes" 1>&4
  1620.   cat >> confdefs.h <<\EOF
  1621. #define HAVE_VFORK_H 1
  1622. EOF
  1623.  
  1624. else
  1625.   echo "$ac_t""no" 1>&4
  1626. fi
  1627.  
  1628. echo $ac_n "checking for working vfork""... $ac_c" 1>&4
  1629. if eval "test \"`echo '${'ac_cv_func_vfork'+set}'`\" = set"; then
  1630.   echo $ac_n "(cached) $ac_c" 1>&4
  1631. else
  1632.   
  1633. if test "$cross_compiling" = yes; then
  1634.   ac_cv_func_vfork=no
  1635. else
  1636. cat > conftest.$ac_ext <<EOF
  1637. #line 1638 "configure"
  1638. #include "confdefs.h"
  1639. /* Thanks to Paul Eggert for this test.  */
  1640. #include <stdio.h>
  1641. #include <sys/types.h>
  1642. #include <sys/stat.h>
  1643. #include <signal.h>
  1644. #ifdef HAVE_UNISTD_H
  1645. #include <unistd.h>
  1646. #endif
  1647. #ifdef HAVE_VFORK_H
  1648. #include <vfork.h>
  1649. #endif
  1650. /* On sparc systems, changes by the child to local and incoming
  1651.    argument registers are propagated back to the parent.
  1652.    The compiler is told about this with #include <vfork.h>,
  1653.    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
  1654.    Test for this by using a static variable whose address
  1655.    is put into a register that is clobbered by the vfork.  */
  1656. static
  1657. #ifdef __cplusplus
  1658. sparc_address_test (int arg)
  1659. #else
  1660. sparc_address_test (arg) int arg;
  1661. #endif
  1662. {
  1663.   static pid_t child;
  1664.   if (!child) {
  1665.     child = vfork ();
  1666.     if (child < 0)
  1667.       perror ("vfork");
  1668.     if (!child) {
  1669.       arg = getpid();
  1670.       write(-1, "", 0);
  1671.       _exit (arg);
  1672.     }
  1673.   }
  1674. }
  1675. static int signalled;
  1676. static RETSIGTYPE catch (s) int s; { signalled = 1; }
  1677. main() {
  1678.   pid_t parent = getpid ();
  1679.   pid_t child;
  1680.  
  1681.   sparc_address_test ();
  1682.  
  1683.   signal (SIGINT, catch);
  1684.  
  1685.   child = vfork ();
  1686.  
  1687.   if (child == 0) {
  1688.     /* Here is another test for sparc vfork register problems.
  1689.        This test uses lots of local variables, at least
  1690.        as many local variables as main has allocated so far
  1691.        including compiler temporaries.  4 locals are enough for
  1692.        gcc 1.40.3 on a sparc, but we use 8 to be safe.
  1693.        A buggy compiler should reuse the register of parent
  1694.        for one of the local variables, since it will think that
  1695.        parent can't possibly be used any more in this routine.
  1696.        Assigning to the local variable will thus munge parent
  1697.        in the parent process.  */
  1698.     pid_t
  1699.       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
  1700.       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
  1701.     /* Convince the compiler that p..p7 are live; otherwise, it might
  1702.        use the same hardware register for all 8 local variables.  */
  1703.     if (p != p1 || p != p2 || p != p3 || p != p4
  1704.     || p != p5 || p != p6 || p != p7)
  1705.       _exit(1);
  1706.  
  1707.     /* On some systems (e.g. SunOS 5.2), if the parent is catching
  1708.        a signal, the child ignores the signal before execing,
  1709.        and the parent later receives that signal, the parent dumps core.
  1710.        Test for this by ignoring SIGINT in the child.  */
  1711.     signal (SIGINT, SIG_IGN);
  1712.  
  1713.     /* On some systems (e.g. IRIX 3.3),
  1714.        vfork doesn't separate parent from child file descriptors.
  1715.        If the child closes a descriptor before it execs or exits,
  1716.        this munges the parent's descriptor as well.
  1717.        Test for this by closing stdout in the child.  */
  1718.     _exit(close(fileno(stdout)) != 0);
  1719.   } else {
  1720.     int status;
  1721.     struct stat st;
  1722.  
  1723.     while (wait(&status) != child)
  1724.       ;
  1725.     exit(
  1726.      /* Was there some problem with vforking?  */
  1727.      child < 0
  1728.  
  1729.      /* Did the child fail?  (This shouldn't happen.)  */
  1730.      || status
  1731.  
  1732.      /* Did the vfork/compiler bug occur?  */
  1733.      || parent != getpid()
  1734.  
  1735.      /* Did the signal handling bug occur?  */
  1736.      || kill(parent, SIGINT) != 0
  1737.      || signalled != 1
  1738.  
  1739.      /* Did the file descriptor bug occur?  */
  1740.      || fstat(fileno(stdout), &st) != 0
  1741.      );
  1742.   }
  1743. }
  1744. EOF
  1745. eval $ac_link
  1746. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1747.   ac_cv_func_vfork=yes
  1748. else
  1749.   ac_cv_func_vfork=no
  1750. fi
  1751. fi
  1752. rm -fr conftest*
  1753. fi
  1754. echo "$ac_t""$ac_cv_func_vfork" 1>&4
  1755. if test $ac_cv_func_vfork = no; then
  1756.   cat >> confdefs.h <<\EOF
  1757. #define vfork fork
  1758. EOF
  1759.  
  1760. fi
  1761.  
  1762. echo $ac_n "checking for vprintf""... $ac_c" 1>&4
  1763. if eval "test \"`echo '${'ac_cv_func_vprintf'+set}'`\" = set"; then
  1764.   echo $ac_n "(cached) $ac_c" 1>&4
  1765. else
  1766.   cat > conftest.$ac_ext <<EOF
  1767. #line 1768 "configure"
  1768. #include "confdefs.h"
  1769. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1770. int main() { return 0; }
  1771. int t() {
  1772.  
  1773. /* The GNU C library defines this for functions which it implements
  1774.     to always fail with ENOSYS.  Some functions are actually named
  1775.     something starting with __ and the normal name is an alias.  */
  1776. #if defined (__stub_vprintf) || defined (__stub___vprintf)
  1777. choke me
  1778. #else
  1779. /* Override any gcc2 internal prototype to avoid an error.  */
  1780. char vprintf(); vprintf();
  1781. #endif
  1782.  
  1783. ; return 0; }
  1784. EOF
  1785. if eval $ac_link; then
  1786.   rm -rf conftest*
  1787.   eval "ac_cv_func_vprintf=yes"
  1788. else
  1789.   rm -rf conftest*
  1790.   eval "ac_cv_func_vprintf=no"
  1791. fi
  1792. rm -f conftest*
  1793.  
  1794. fi
  1795. if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
  1796.   echo "$ac_t""yes" 1>&4
  1797.   cat >> confdefs.h <<\EOF
  1798. #define HAVE_VPRINTF 1
  1799. EOF
  1800.  
  1801. else
  1802.   echo "$ac_t""no" 1>&4
  1803. fi
  1804.  
  1805. if test "$ac_cv_func_vprintf" != yes; then
  1806. echo $ac_n "checking for _doprnt""... $ac_c" 1>&4
  1807. if eval "test \"`echo '${'ac_cv_func__doprnt'+set}'`\" = set"; then
  1808.   echo $ac_n "(cached) $ac_c" 1>&4
  1809. else
  1810.   cat > conftest.$ac_ext <<EOF
  1811. #line 1812 "configure"
  1812. #include "confdefs.h"
  1813. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1814. int main() { return 0; }
  1815. int t() {
  1816.  
  1817. /* The GNU C library defines this for functions which it implements
  1818.     to always fail with ENOSYS.  Some functions are actually named
  1819.     something starting with __ and the normal name is an alias.  */
  1820. #if defined (__stub__doprnt) || defined (__stub____doprnt)
  1821. choke me
  1822. #else
  1823. /* Override any gcc2 internal prototype to avoid an error.  */
  1824. char _doprnt(); _doprnt();
  1825. #endif
  1826.  
  1827. ; return 0; }
  1828. EOF
  1829. if eval $ac_link; then
  1830.   rm -rf conftest*
  1831.   eval "ac_cv_func__doprnt=yes"
  1832. else
  1833.   rm -rf conftest*
  1834.   eval "ac_cv_func__doprnt=no"
  1835. fi
  1836. rm -f conftest*
  1837.  
  1838. fi
  1839. if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
  1840.   echo "$ac_t""yes" 1>&4
  1841.   cat >> confdefs.h <<\EOF
  1842. #define HAVE_DOPRNT 1
  1843. EOF
  1844.  
  1845. else
  1846.   echo "$ac_t""no" 1>&4
  1847. fi
  1848.  
  1849. fi
  1850.  
  1851. echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&4
  1852. if eval "test \"`echo '${'ac_cv_struct_st_blksize'+set}'`\" = set"; then
  1853.   echo $ac_n "(cached) $ac_c" 1>&4
  1854. else
  1855.   cat > conftest.$ac_ext <<EOF
  1856. #line 1857 "configure"
  1857. #include "confdefs.h"
  1858. #include <sys/types.h>
  1859. #include <sys/stat.h>
  1860. int main() { return 0; }
  1861. int t() {
  1862. struct stat s; s.st_blksize;
  1863. ; return 0; }
  1864. EOF
  1865. if eval $ac_link; then
  1866.   rm -rf conftest*
  1867.   ac_cv_struct_st_blksize=yes
  1868. else
  1869.   rm -rf conftest*
  1870.   ac_cv_struct_st_blksize=no
  1871. fi
  1872. rm -f conftest*
  1873.  
  1874. fi
  1875. echo "$ac_t""$ac_cv_struct_st_blksize" 1>&4
  1876. if test $ac_cv_struct_st_blksize = yes; then
  1877.   cat >> confdefs.h <<\EOF
  1878. #define HAVE_ST_BLKSIZE 1
  1879. EOF
  1880.  
  1881. fi
  1882.  
  1883. trap '' 1 2 15
  1884. if test -w $cache_file; then
  1885. echo "updating cache $cache_file"
  1886. cat > $cache_file <<\EOF
  1887. # This file is a shell script that caches the results of configure
  1888. # tests run on this system so they can be shared between configure
  1889. # scripts and configure runs.  It is not useful on other systems.
  1890. # If it contains results you don't want to keep, you may remove or edit it.
  1891. #
  1892. # By default, configure uses ./config.cache as the cache file,
  1893. # creating it if it does not exist already.  You can give configure
  1894. # the --cache-file=FILE option to use a different cache file; that is
  1895. # what configure does when it calls configure scripts in
  1896. # subdirectories, so they share the cache.
  1897. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  1898. # config.status only pays attention to the cache file if you give it the
  1899. # --recheck option to rerun configure.
  1900. #
  1901. EOF
  1902. # Ultrix sh set writes to stderr and can't be redirected directly.
  1903. (set) 2>&1 |
  1904.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/: \${\1='\2'}/p" \
  1905.   >> $cache_file
  1906. else
  1907. echo "not updating unwritable cache $cache_file"
  1908. fi
  1909.  
  1910. trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  1911.  
  1912. test "x$prefix" = xNONE && prefix=/usr/local
  1913. # Let make expand exec_prefix.
  1914. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  1915.  
  1916. # Any assignment to VPATH causes Sun make to only execute
  1917. # the first set of double-colon rules, so remove it if not needed.
  1918. # If there is a colon in the path, we need to keep it.
  1919. if test "x$srcdir" = x.; then
  1920.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  1921. fi
  1922.  
  1923. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  1924.  
  1925. DEFS=-DHAVE_CONFIG_H
  1926.  
  1927. # Without the "./", some shells look in PATH for config.status.
  1928. : ${CONFIG_STATUS=./config.status}
  1929.  
  1930. echo creating $CONFIG_STATUS
  1931. rm -f $CONFIG_STATUS
  1932. cat > $CONFIG_STATUS <<EOF
  1933. #!/bin/sh
  1934. # Generated automatically by configure.
  1935. # Run this file to recreate the current configuration.
  1936. # This directory was configured as follows,
  1937. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1938. #
  1939. # $0 $ac_configure_args
  1940. #
  1941. # Compiler output produced by configure, useful for debugging
  1942. # configure, is in ./config.log if it exists.
  1943.  
  1944. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  1945. for ac_option
  1946. do
  1947.   case "\$ac_option" in
  1948.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  1949.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  1950.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  1951.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  1952.     echo "$CONFIG_STATUS generated by autoconf version 1.120"
  1953.     exit 0 ;;
  1954.   -help | --help | --hel | --he | --h)
  1955.     echo "\$ac_cs_usage"; exit 0 ;;
  1956.   *) echo "\$ac_cs_usage"; exit 1 ;;
  1957.   esac
  1958. done
  1959.  
  1960. ac_given_srcdir=$srcdir
  1961. ac_given_INSTALL="$INSTALL"
  1962.  
  1963. trap 'rm -fr Makefile config.h:config.hin conftest*; exit 1' 1 2 15
  1964.  
  1965. # Protect against being on the right side of a sed subst in config.status. 
  1966. sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 
  1967.  s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
  1968. $ac_vpsub
  1969. $extrasub
  1970. s%@CFLAGS@%$CFLAGS%g
  1971. s%@CPPFLAGS@%$CPPFLAGS%g
  1972. s%@CXXFLAGS@%$CXXFLAGS%g
  1973. s%@DEFS@%$DEFS%g
  1974. s%@LDFLAGS@%$LDFLAGS%g
  1975. s%@LIBS@%$LIBS%g
  1976. s%@exec_prefix@%$exec_prefix%g
  1977. s%@prefix@%$prefix%g
  1978. s%@program_transform_name@%$program_transform_name%g
  1979. s%@CC@%$CC%g
  1980. s%@CPP@%$CPP%g
  1981. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  1982. s%@INSTALL_DATA@%$INSTALL_DATA%g
  1983. s%@LIBOBJS@%$LIBOBJS%g
  1984. s%@ALLOCA@%$ALLOCA%g
  1985.  
  1986. CEOF
  1987. EOF
  1988. cat >> $CONFIG_STATUS <<EOF
  1989.  
  1990. CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
  1991. EOF
  1992. cat >> $CONFIG_STATUS <<\EOF
  1993. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  1994.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  1995.   case "$ac_file" in
  1996.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  1997.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  1998.   *) ac_file_in="${ac_file}.in" ;;
  1999.   esac
  2000.  
  2001.   # Adjust relative srcdir, etc. for subdirectories.
  2002.  
  2003.   # Remove last slash and all that follows it.  Not all systems have dirname.
  2004.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2005.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  2006.     # The file is in a subdirectory.
  2007.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  2008.     ac_dir_suffix="/$ac_dir"
  2009.     # A "../" for each directory in $ac_dir_suffix.
  2010.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  2011.   else
  2012.     ac_dir_suffix= ac_dots=
  2013.   fi
  2014.  
  2015.   case "$ac_given_srcdir" in
  2016.   .)  srcdir=.
  2017.       if test -z "$ac_dots"; then top_srcdir=.
  2018.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  2019.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  2020.   *) # Relative path.
  2021.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  2022.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  2023.   esac
  2024.  
  2025.   case "$ac_given_INSTALL" in
  2026.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  2027.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  2028.   esac
  2029.   echo creating "$ac_file"
  2030.   rm -f "$ac_file"
  2031.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  2032.   case "$ac_file" in
  2033.   *Makefile*) ac_comsub="1i\\
  2034. # $configure_input" ;;
  2035.   *) ac_comsub= ;;
  2036.   esac
  2037.   sed -e "$ac_comsub
  2038. s%@configure_input@%$configure_input%g
  2039. s%@srcdir@%$srcdir%g
  2040. s%@top_srcdir@%$top_srcdir%g
  2041. s%@INSTALL@%$INSTALL%g
  2042. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  2043. fi; done
  2044. rm -f conftest.subs
  2045.  
  2046. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  2047. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  2048. #
  2049. # ac_d sets the value in "#define NAME VALUE" lines.
  2050. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  2051. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  2052. ac_dC='\3'
  2053. ac_dD='%g'
  2054. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  2055. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2056. ac_uB='\([     ]\)%\1#\2define\3'
  2057. ac_uC=' '
  2058. ac_uD='\4%g'
  2059. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  2060. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2061. ac_eB='$%\1#\2define\3'
  2062. ac_eC=' '
  2063. ac_eD='%g'
  2064.  
  2065. CONFIG_HEADERS=${CONFIG_HEADERS-"config.h:config.hin"}
  2066. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  2067.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  2068.   case "$ac_file" in
  2069.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  2070.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2071.   *) ac_file_in="${ac_file}.in" ;;
  2072.   esac
  2073.  
  2074.   echo creating $ac_file
  2075.  
  2076.   rm -f conftest.frag conftest.in conftest.out
  2077.   cp $ac_given_srcdir/$ac_file_in conftest.in
  2078.  
  2079. EOF
  2080.  
  2081. # Transform confdefs.h into a sed script conftest.vals that substitutes
  2082. # the proper values into config.h.in to produce config.h.  And first:
  2083. # Protect against being on the right side of a sed subst in config.status. 
  2084. # Protect against being in an unquoted here document in config.status.
  2085. rm -f conftest.vals
  2086. cat > conftest.hdr <<\EOF
  2087. s/[\\&%]/\\&/g
  2088. s%[\\$`]%\\&%g
  2089. s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  2090. s%ac_d%ac_u%gp
  2091. s%ac_u%ac_e%gp
  2092. EOF
  2093. sed -n -f conftest.hdr confdefs.h > conftest.vals
  2094. rm -f conftest.hdr
  2095.  
  2096. # This sed command replaces #undef with comments.  This is necessary, for
  2097. # example, in the case of _POSIX_SOURCE, which is predefined and required
  2098. # on some systems where configure will not decide to define it.
  2099. cat >> conftest.vals <<\EOF
  2100. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  2101. EOF
  2102.  
  2103. # Break up conftest.vals because some shells have a limit on
  2104. # the size of here documents, and old seds have small limits too.
  2105. # Maximum number of lines to put in a single here document.
  2106. ac_max_here_lines=12
  2107.  
  2108. rm -f conftest.tail
  2109. while :
  2110. do
  2111.   ac_lines=`grep -c . conftest.vals`
  2112.   # grep -c gives empty output for an empty file on some AIX systems.
  2113.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  2114.   # Write a limited-size here document to conftest.frag.
  2115.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  2116.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  2117.   echo 'CEOF
  2118.   sed -f conftest.frag conftest.in > conftest.out
  2119.   rm -f conftest.in
  2120.   mv conftest.out conftest.in
  2121. ' >> $CONFIG_STATUS
  2122.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  2123.   rm -f conftest.vals
  2124.   mv conftest.tail conftest.vals
  2125. done
  2126. rm -f conftest.vals
  2127.  
  2128. cat >> $CONFIG_STATUS <<\EOF
  2129.   rm -f conftest.frag conftest.h
  2130.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  2131.   cat conftest.in >> conftest.h
  2132.   rm -f conftest.in
  2133.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  2134.     echo "$ac_file is unchanged"
  2135.     rm -f conftest.h
  2136.   else
  2137.     rm -f $ac_file
  2138.     mv conftest.h $ac_file
  2139.   fi
  2140. fi; done
  2141.  
  2142.  
  2143. date > stamp-h
  2144. exit 0
  2145. EOF
  2146. chmod +x $CONFIG_STATUS
  2147. rm -fr confdefs* $ac_clean_files
  2148. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS
  2149.  
  2150.